<template>
	<view>导航组件</view>
	<view>组件的name属性：{{ name }}</view>
	<view>组件的content属性：{{ content }}</view>
	<slot></slot>
	<button @click="handleChange">修改content内容</button>
</template>

<script setup>
// import { defineEmits } from 'vue';
// defineProps(['name', 'content']);
defineProps({
	name: String,
	content: {
		type: String,
		default: () => {
			return '默认值';
		}
	}
});

const emit = defineEmits(['changeData']);
const handleChange = () => {
	emit('changeData', '修改后的数据');
};
</script>

<style></style>
